From 9045339b910be812bc7700265fa2f8fb6f5f7855 Mon Sep 17 00:00:00 2001 From: robertlipe Date: Mon, 9 Jun 2014 03:50:11 +0000 Subject: [PATCH] Move logging into src/core. --- gpsbabel/GPSBabel.pro | 4 ++-- gpsbabel/gpx.cc | 9 +-------- gpsbabel/lowranceusr.cc | 6 ++---- gpsbabel/{ => src/core}/logging.h | 0 gpsbabel/waypt.cc | 3 +-- 5 files changed, 6 insertions(+), 16 deletions(-) rename gpsbabel/{ => src/core}/logging.h (100%) diff --git a/gpsbabel/GPSBabel.pro b/gpsbabel/GPSBabel.pro index a78578151..188e791f3 100644 --- a/gpsbabel/GPSBabel.pro +++ b/gpsbabel/GPSBabel.pro @@ -215,7 +215,6 @@ HEADERS = \ jeeps/gpsusbcommon.h \ jeeps/gpsusbint.h \ jeeps/gpsutil.h \ - logging.h \ magellan.h \ mapsend.h \ navilink.h \ @@ -237,7 +236,8 @@ HEADERS = \ zlib/zconf.in.h \ zlib/zlib.h \ zlib/zutil.h \ - src/core/xmlstreamwriter.h + src/core/xmlstreamwriter.h \ + src/core/logging.h SUBDIRS += jeeps diff --git a/gpsbabel/gpx.cc b/gpsbabel/gpx.cc index feabd47e8..aedd74679 100644 --- a/gpsbabel/gpx.cc +++ b/gpsbabel/gpx.cc @@ -23,7 +23,7 @@ #include "cet_util.h" #include "garmin_fs.h" #include "garmin_tables.h" -#include "logging.h" +#include "src/core/logging.h" #include #include static QXmlStreamReader* reader; @@ -860,18 +860,11 @@ xml_parse_time(const QString& dateTimeString) static void gpx_end(const QString& el) { - int pos = current_tag.lastIndexOf('/'); - QString s = current_tag.mid(pos + 1); float x; int passthrough; static QDateTime gc_log_date; tag_type tag; - if (s.compare(el)) { -// TODO: I don't think this is necesary with QXmlStreamReader - fprintf(stderr, "Mismatched tag %s. Expected %s\n", CSTR(el), qPrintable(s)); - } - tag = get_tag(current_tag, &passthrough); switch (tag) { /* diff --git a/gpsbabel/lowranceusr.cc b/gpsbabel/lowranceusr.cc index 4322a6cb1..4f192496c 100644 --- a/gpsbabel/lowranceusr.cc +++ b/gpsbabel/lowranceusr.cc @@ -382,8 +382,6 @@ lowranceusr_parse_waypt(Waypoint* wpt_tmp) { char buff[MAXUSRSTRINGSIZE + 1]; int text_len; - time_t waypt_time; - short waypt_type; wpt_tmp->latitude = lat_mm_to_deg(gbfgetint32(file_in)); wpt_tmp->longitude = lon_mm_to_deg(gbfgetint32(file_in)); @@ -408,7 +406,7 @@ lowranceusr_parse_waypt(Waypoint* wpt_tmp) wpt_tmp->description = buff; } /* Time is number of seconds since Jan. 1, 2000 */ - waypt_time = gbfgetint32(file_in); + time_t waypt_time = gbfgetint32(file_in); if (waypt_time) { wpt_tmp->SetCreationTime(base_time_secs + waypt_time); } @@ -429,7 +427,7 @@ lowranceusr_parse_waypt(Waypoint* wpt_tmp) } /* Waypoint Type (USER, TEMPORARY, POINT_OF_INTEREST) */ - waypt_type = gbfgetint16(file_in); + short waypt_type = gbfgetint16(file_in); if (global_opts.debug_level >= 1) { printf(MYNAME " parse_waypt: waypt_type = %d\n",waypt_type); } diff --git a/gpsbabel/logging.h b/gpsbabel/src/core/logging.h similarity index 100% rename from gpsbabel/logging.h rename to gpsbabel/src/core/logging.h diff --git a/gpsbabel/waypt.cc b/gpsbabel/waypt.cc index 44b860831..612c8ba52 100644 --- a/gpsbabel/waypt.cc +++ b/gpsbabel/waypt.cc @@ -29,8 +29,7 @@ #include "grtcirc.h" #include "garmin_fs.h" #include "session.h" - -#include +#include "src/core/logging.h" #if NEWQ QList waypt_list; -- 2.30.2